import React, { Component } from "react";

export default class App extends Component {
  state = {
    todoList: ["吃饭", "睡觉", "打豆豆"], //真实数据
    // todoList: [<li>吃饭</li>, <li>睡觉</li>, <li>打豆豆</li>],  //理想数据
  };
  render() {
    return (
      <div>
        <ol>
          {this.state.todoList.map((item, i) => (
            <li key={i}>{item}</li>
          ))}
        </ol>
      </div>
    );
  }
}
